home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / termsorc.lha / Extras / Source / term-source.lha / termGlobal.h < prev    next >
Text File  |  1995-09-26  |  45KB  |  1,750 lines

  1. /*
  2. **    termGlobal.h
  3. **
  4. **    Global data structure definitions
  5. **
  6. **    Copyright © 1990-1995 by Olaf `Olsen' Barthel
  7. **        All Rights Reserved
  8. */
  9.  
  10.     /* The configuration file format version. This will from now
  11.      * on hopefully stay the same.
  12.      */
  13.  
  14. #define CONFIG_FILE_VERSION    4
  15. #define CONFIG_FILE_REVISION    3
  16.  
  17.     // The asynchronous xpr_sread gets enabled by this
  18.  
  19. #define ASYNC_XPR_SREAD        1
  20.  
  21.     // IDCMP flags for the main window
  22.  
  23. #define DEFAULT_IDCMP        (IDCMP_RAWKEY | IDCMP_INACTIVEWINDOW | IDCMP_ACTIVEWINDOW | IDCMP_MOUSEMOVE | IDCMP_GADGETUP | IDCMP_GADGETDOWN | IDCMP_MENUPICK | IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_CLOSEWINDOW | IDCMP_NEWSIZE | IDCMP_IDCMPUPDATE | IDCMP_MENUHELP)
  24.  
  25.     /* Jump table entry. */
  26.  
  27. typedef BYTE (*  JUMP)(UBYTE Char);
  28.  
  29.     /* Pointer to function returning nothing. */
  30.  
  31. typedef VOID (* VPTR)();
  32.  
  33.     /* Capture output routine. */
  34.  
  35. typedef VOID (* __regargs COPTR)(register APTR Data,register LONG Size);
  36.  
  37.     /* Menu item codes. */
  38.  
  39. enum    {    MEN_SAVE_AS_PICTURE=1,MEN_SAVE_AS_TEXT,MEN_PRINT_SCREEN,MEN_PRINT_CLIP,MEN_CAPTURE_TO_FILE,
  40.         MEN_CAPTURE_TO_PRINTER,MEN_ICONIFY,MEN_ABOUT,MEN_QUIT,
  41.  
  42.         MEN_COPY,MEN_PASTE,MEN_CLEAR,
  43.  
  44.         MEN_EXECUTE_DOS_COMMAND,MEN_EXECUTE_REXX_COMMAND,MEN_RECORD,MEN_RECORD_LINE,
  45.         MEN_EDIT_TRAPS,MEN_DISABLE_TRAPS,
  46.  
  47.         MEN_PHONEBOOK,MEN_REDIAL,MEN_DIAL_NUMBER,MEN_SEND_BREAK,
  48.         MEN_HANG_UP,MEN_WAIT,MEN_FLUSH_BUFFER,MEN_RELEASE_DEVICE,
  49.  
  50.         MEN_UPLOAD_ASCII,MEN_DOWNLOAD_ASCII,MEN_UPLOAD_TEXT,MEN_DOWNLOAD_TEXT,MEN_EDIT_AND_UPLOAD_TEXT,
  51.         MEN_UPLOAD_BINARY,MEN_DOWNLOAD_BINARY,
  52.  
  53.         MEN_CLEAR_BUFFER,MEN_DISPLAY_BUFFER,MEN_CLOSE_BUFFER,MEN_FREEZE_BUFFER,MEN_OPEN_BUFFER,
  54.         MEN_SAVE_BUFFER_AS,
  55.  
  56.         MEN_CLEAR_SCREEN,MEN_RESET_FONT,MEN_RESET_STYLES,MEN_RESET_TERMINAL,
  57.  
  58.         MEN_SERIAL,MEN_MODEM,MEN_SCREEN,MEN_TERMINAL,MEN_SET_EMULATION,MEN_CLIPBOARD,MEN_CAPTURE,MEN_COMMANDS,
  59.         MEN_MISC,MEN_PATH,MEN_TRANSFER_PROTOCOL,MEN_TRANSFER,MEN_TRANSLATION,MEN_MACROS,
  60.         MEN_CURSORKEYS,MEN_FAST_MACROS,MEN_HOTKEYS,MEN_SPEECH,MEN_SOUND,MEN_RATES,MEN_SET_CONSOLE,MEN_OPEN_SETTINGS,MEN_SAVE_SETTINGS,
  61.         MEN_SAVE_SETTINGS_AS,
  62.  
  63.         MEN_STATUS_WINDOW,MEN_REVIEW_WINDOW,MEN_PACKET_WINDOW,MEN_CHAT_LINE,MEN_FAST_MACROS_WINDOW,
  64.         MEN_UPLOAD_QUEUE_WINDOW,
  65.  
  66.         // Avoid recompilation
  67.  
  68.         MEN_PRINT_SCREEN_AS_GFX,
  69.         MEN_EXTRA_DIAL,
  70.         MEN_MATRIX_WINDOW,
  71.         MEN_CAPTURE_TO_RAW_FILE
  72.     };
  73.  
  74.     /* Menu item code limit, required by the quick dial menu. */
  75.  
  76. #define DIAL_MENU_LIMIT 1000
  77.  
  78.     /* How many phone book entries will be stored in
  79.      * the quick dial menu.
  80.      */
  81.  
  82. #define DIAL_MENU_MAX    50
  83.  
  84.     /* Undefine the following symbols, the preferences header file
  85.      * will use the same names and the same values.
  86.      */
  87.  
  88. #undef PARITY_NONE
  89. #undef PARITY_EVEN
  90. #undef PARITY_ODD
  91. #undef PARITY_MARK
  92. #undef PARITY_SPACE
  93.  
  94.     /* Serial settings. */
  95.  
  96. enum    {    PARITY_NONE,PARITY_EVEN,PARITY_ODD,PARITY_MARK,PARITY_SPACE };
  97.  
  98. enum    {    HANDSHAKING_NONE,HANDSHAKING_RTSCTS,HANDSHAKING_RTSCTS_DSR };
  99. enum    {    DUPLEX_FULL,DUPLEX_HALF };
  100. enum    {    FLOW_NONE,FLOW_XON_XOFF };
  101.  
  102.     /* Terminal settings. */
  103.  
  104. enum    {    EOL_IGNORE,EOL_CR,EOL_LF,EOL_CRLF,EOL_LFCR };
  105. enum    {    EMULATION_ANSIVT100,EMULATION_ATOMIC,EMULATION_TTY,EMULATION_EXTERNAL,EMULATION_HEX };
  106. enum    {    COLOUR_AMIGA,COLOUR_EIGHT,COLOUR_SIXTEEN,COLOUR_MONO };
  107.  
  108.     /* Protocol types. */
  109.  
  110. enum    {    PROTOCOL_XMODEM,PROTOCOL_XMODEMCRC,PROTOCOL_YMODEM,PROTOCOL_ZMODEM };
  111.  
  112.     /* Font types. */
  113.  
  114. enum    {    FONT_STANDARD,FONT_IBM,FONT_IBM_RAW };
  115.  
  116.     /* Bell modes. */
  117.  
  118. enum    {    BELL_NONE, BELL_VISIBLE, BELL_AUDIBLE, BELL_BOTH, BELL_SYSTEM };
  119.  
  120.     /* Data flow scanner indices. */
  121.  
  122. enum    {    SCAN_NOCARRIER, SCAN_CONNECT, SCAN_VOICE, SCAN_RING, SCAN_BUSY, SCAN_NODIALTONE,
  123.         SCAN_OK, SCAN_ERROR, SCAN_SIGDEFAULTUPLOAD, SIG_DEFAULTUPLOAD,
  124.         SCAN_SIGASCIIUPLOAD,SCAN_SIGASCIIDOWNLOAD, SCAN_SIGTEXTUPLOAD,
  125.         SCAN_SIGTEXTDOWNLOAD, SCAN_SIGBINARYUPLOAD,
  126.         SCAN_SIGBINARYDOWNLOAD, SCAN_COUNT
  127.     };
  128.  
  129.     /* Status types. */
  130.  
  131. enum    {    STATUS_READY,STATUS_HOLDING,STATUS_DIALING,STATUS_UPLOAD,
  132.         STATUS_DOWNLOAD,STATUS_BREAKING,STATUS_HANGUP,
  133.         STATUS_RECORDING,STATUS_RECORDING_LINE
  134.     };
  135.  
  136.     /* Sound types. */
  137.  
  138. enum    {    SOUND_BELL,SOUND_CONNECT,SOUND_DISCONNECT,SOUND_GOODTRANSFER,
  139.         SOUND_BADTRANSFER,SOUND_RING,SOUND_VOICE,SOUND_ERROR,
  140.         SOUND_COUNT
  141.     };
  142.  
  143.     /* Settings types. */
  144.  
  145. enum    {    PREF_ALL,PREF_SERIAL,PREF_MODEM,PREF_COMMAND,PREF_SCREEN,
  146.         PREF_TERMINAL,PREF_PATH,PREF_MISC,PREF_CLIP,PREF_CAPTURE,
  147.         PREF_FILE,PREF_EMULATION,PREF_TRANSFER,PREF_TRANSLATIONFILENAME,
  148.         PREF_MACROFILENAME,PREF_CURSORFILENAME,PREF_FASTMACROFILENAME,
  149.         PREF_RATES
  150.     };
  151.  
  152.     /* Status line modes. */
  153.  
  154. enum    {    STATUSLINE_DISABLED,STATUSLINE_STANDARD,STATUSLINE_COMPRESSED };
  155.  
  156.     /* Capture filter modes. */
  157.  
  158. enum    {    FILTER_NONE,FILTER_ESCAPE,FILTER_CONTROL,FILTER_BOTH };
  159.  
  160.     /* Scrolling modes. */
  161.  
  162. enum    {    SCROLL_JUMP,SCROLL_SMOOTH };
  163.  
  164.     /* Auto-capture file creation. */
  165.  
  166. enum    {    AUTOCAPTURE_DATE_NAME,AUTOCAPTURE_DATE_INCLUDE };
  167.  
  168.     /* Cursor and numeric keypad modes. */
  169.  
  170. enum    {    KEYMODE_STANDARD,KEYMODE_APPLICATION };
  171.  
  172.     /* Font scales. */
  173.  
  174. enum    {    SCALE_NORMAL,SCALE_HALF };
  175. enum    {    SCALE_ATTR_NORMAL,SCALE_ATTR_TOP2X,SCALE_ATTR_BOT2X,SCALE_ATTR_2X };
  176.  
  177.     /* Character tables. */
  178.  
  179. enum    {    TABLE_ASCII,TABLE_GFX };
  180.  
  181.     /* Transfer types. */
  182.  
  183. enum    {    TRANSFER_BINARY,TRANSFER_TEXT,TRANSFER_ASCII };
  184.  
  185.     /* Translation table entry types. */
  186.  
  187. enum    {    TRANSLATE_SINGLE,TRANSLATE_STRING };
  188.  
  189.     /* Upload panel actions. */
  190.  
  191. enum    {    UPLOAD_TEXT=1,UPLOAD_BINARY,UPLOAD_IGNORE,UPLOAD_ABORT,
  192.         UPLOAD_TEXT_FROM_LIST,UPLOAD_BINARY_FROM_LIST,UPLOAD_DUMMY
  193.     };
  194.  
  195.     /* Alert types. */
  196.  
  197. enum    {    ALERT_NONE,ALERT_BEEP,ALERT_SCREEN,ALERT_BEEP_SCREEN };
  198.  
  199.     /* Online time display modes. */
  200.  
  201. enum    {    ONLINETIME_TIME,ONLINETIME_COST,ONLINETIME_BOTH };
  202.  
  203.     /* Clipboard read errors. */
  204.  
  205. enum    {    CLIPERR_NONE,CLIPERR_NOTEXT,CLIPERR_IFF,CLIPERR_OPEN,CLIPERR_MEM };
  206.  
  207.     /* What to print. */
  208.  
  209. enum    {    PRINT_SCREEN,PRINT_CLIP };
  210.  
  211.     /* Dial command types. */
  212.  
  213. enum    {    DIAL_IGNORE,DIAL_LIST,DIAL_REDIAL };
  214.  
  215.     /* Errors returned by ReconfigureSerial(). */
  216.  
  217. enum    {    RECONFIGURE_FAILURE,RECONFIGURE_NOCHANGE,RECONFIGURE_SUCCESS };
  218.  
  219.     /* Operation codes for SetItem(). */
  220.  
  221. enum    {    SETITEM_SETCHECK,SETITEM_CLRCHECK,SETITEM_ON,SETITEM_OFF };
  222.  
  223.     /* File identification actions. */
  224.  
  225. enum    {    IDENTIFY_IGNORE,IDENTIFY_FILETYPE,IDENTIFY_SOURCE };
  226.  
  227.     /* Generic list types. */
  228.  
  229. enum    {    GLIST_UPLOAD,GLIST_DOWNLOAD,GLIST_DIAL,GLIST_WAIT,GLIST_TRAP,GLIST_COUNT };
  230.  
  231.     /* Generic list add operations. */
  232.  
  233. enum    {    ADD_GLIST_BOTTOM,ADD_GLIST_TOP,ADD_GLIST_BEHIND,ADD_GLIST_BEFORE };
  234.  
  235.     /* Dialing modes. */
  236.  
  237. enum    {    DIALMODE_PULSE, DIALMODE_TONE };
  238.  
  239.     /* Transfer window gadgets. */
  240.  
  241. enum    {    GAD_TRANSFER_INFORMATION_LIST=1,
  242.         GAD_TRANSFER_PERCENT,GAD_TRANSFER_TIME,
  243.         GAD_TRANSFER_ABORT,GAD_TRANSFER_SKIP,
  244.         GAD_TRANSFER_PROTOCOL,GAD_TRANSFER_FILE,
  245.         GAD_TRANSFER_SIZE,GAD_TRANSFER_SECONDS,
  246.         GAD_TRANSFER_TOTALTIME,GAD_TRANSFER_ERRORS,
  247.         GAD_TRANSFER_ABORT_FILE
  248.     };
  249.  
  250.     /* How to satisfy OwnDevUnit.library requests. */
  251.  
  252. enum    {    ODU_RELEASE,ODU_WAIT,ODU_KEEP };
  253.  
  254.     /* When to notify the user during a file transfer. */
  255.  
  256. enum    {    XFERNOTIFY_NEVER,XFERNOTIFY_ALWAYS,XFERNOTIFY_START,XFERNOTIFY_END };
  257.  
  258.     /* XPR options setting. */
  259.  
  260. enum    {    GAD_XPROPTIONS_USE=42,GAD_XPROPTIONS_CANCEL };
  261.  
  262.     // Terminal types
  263.  
  264. enum    {    TERMINAL_VT200,TERMINAL_VT102,TERMINAL_VT101,TERMINAL_VT100 };
  265.  
  266.     /* AmigaGuide help context. */
  267.  
  268. enum    {    CONTEXT_MAIN,CONTEXT_SERIAL,CONTEXT_MODEM,CONTEXT_SCREEN,
  269.         CONTEXT_TERMINAL,CONTEXT_CLIP,CONTEXT_CAPTURE,CONTEXT_COMMAND,
  270.         CONTEXT_MISC,CONTEXT_PATHS,CONTEXT_TRANSLATION,CONTEXT_MACROS,
  271.         CONTEXT_CURSOR,CONTEXT_FASTMACROS,CONTEXT_HOTKEYS,CONTEXT_SPEECH,
  272.         CONTEXT_EMULATION,CONTEXT_TRANSFER,CONTEXT_PHONEBOOK,CONTEXT_DATE,
  273.         CONTEXT_DAY,CONTEXT_IMPORT,CONTEXT_RATES,CONTEXT_TIME,
  274.         CONTEXT_COPY,CONTEXT_PASSWORDUSER,CONTEXT_DIAL,CONTEXT_PRINT,
  275.         CONTEXT_TEXTBUFFER,CONTEXT_PACKETWINDOW,CONTEXT_SOUND,
  276.         CONTEXT_LIBS,CONTEXT_ASCII,CONTEXT_PENS,CONTEXT_UPLOAD_QUEUE,
  277.         CONTEXT_TRAPS,CONTEXT_AREA_CODES,CONTEXT_MAIN_MENU,
  278.         CONTEXT_BUFFER_MENU,CONTEXT_PACKET_MENU,CONTEXT_PROJECT_MEN,
  279.         CONTEXT_EDIT_MEN,CONTEXT_CMDS_MEN,CONTEXT_PHONE_MEN,
  280.         CONTEXT_TRANSF_MEN,CONTEXT_BUFFER_MEN,CONTEXT_TERMINAL_MEN,
  281.         CONTEXT_SETTINGS_MEN,CONTEXT_WINDOWS_MEN,CONTEXT_DIAL_MEN,
  282.         CONTEXT_TEXTPEN_PANEL,CONTEXT_ASCII_TRANSFER_SETTINGS,
  283.         CONTEXT_PARAMETERS,CONTEXT_SIGNATURE
  284.  
  285.     };
  286.  
  287.     /* Character types. */
  288.  
  289. enum    {    CHAR_VANILLA,CHAR_CURSOR,CHAR_FUNCTION,CHAR_HELP,
  290.         CHAR_XON,CHAR_XOFF,CHAR_ENTER,CHAR_RETURN };
  291.  
  292.     /* Review window positioning codes. */
  293.  
  294. enum    {    REVIEW_MOVE_TOP,REVIEW_MOVE_BOTTOM,REVIEW_MOVE_UP,REVIEW_MOVE_DOWN };
  295.  
  296.     /* File type classes. */
  297.  
  298. enum    {    FILETYPE_NONE,FILETYPE_DIR,FILETYPE_FILE,FILETYPE_TEXT,FILETYPE_SOUND,
  299.         FILETYPE_PICTURE,FILETYPE_PREFS,FILETYPE_ARCHIVE,
  300.         FILETYPE_PROGRAM,
  301.  
  302.         FILETYPE_COUNT };
  303.  
  304.     /* Text pacing modes. */
  305.  
  306. enum    {    PACE_DIRECT,PACE_ECHO,PACE_ANYECHO,PACE_PROMPT,PACE_DELAY,PACE_KEYBOARD };
  307.  
  308.     /* Where to open the buffer text window. */
  309.  
  310. enum    {    BUFFER_TOP,BUFFER_END };
  311.  
  312.     /* Where to place the buffer screen horizontally. */
  313.  
  314. enum    {    SCREEN_LEFT,SCREEN_CENTRE,SCREEN_RIGHT };
  315.  
  316.     /* File transfer mode. */
  317.  
  318. enum    {    XFER_XPR,XFER_EXTERNALPROGRAM,XFER_DEFAULT,XFER_INTERNAL };
  319.  
  320.     /* File transfer protocol signatures. */
  321.  
  322. enum    {    TRANSFERSIG_DEFAULTUPLOAD,TRANSFERSIG_DEFAULTDOWNLOAD,
  323.         TRANSFERSIG_ASCIIUPLOAD,TRANSFERSIG_ASCIIDOWNLOAD,
  324.         TRANSFERSIG_TEXTUPLOAD,TRANSFERSIG_TEXTDOWNLOAD,
  325.         TRANSFERSIG_BINARYUPLOAD,TRANSFERSIG_BINARYDOWNLOAD
  326.     };
  327.  
  328.     /* Requester modes. */
  329.  
  330. enum    {    REQUESTERMODE_CENTRE,REQUESTERMODE_PREFS,
  331.         REQUESTERMODE_IGNORE
  332.     };
  333.  
  334.     /* Buffer capture modes. */
  335.  
  336. enum    {    BUFFERMODE_FLOW, BUFFERMODE_REVIEW };
  337.  
  338.     /* How to sort the phonebook. */
  339.  
  340. enum    {    SORT_NAME,SORT_NUMBER,SORT_COMMENT,SORT_SELECTION };
  341.  
  342.     /* Some raw key codes. */
  343.  
  344. #define HELP_CODE        95
  345. #define DEL_CODE        70
  346. #define BACKSPACE_CODE        65
  347. #define RAMIGA_CODE        103
  348. #define TAB_CODE        66
  349.  
  350. #define CURSOR_UP_CODE        76
  351. #define CURSOR_DOWN_CODE    77
  352. #define CURSOR_RIGHT_CODE    78
  353. #define CURSOR_LEFT_CODE    79
  354.  
  355. #define F01_CODE        80
  356. #define F02_CODE        81
  357. #define F03_CODE        82
  358. #define F04_CODE        83
  359. #define F05_CODE        84
  360. #define F06_CODE        85
  361. #define F07_CODE        86
  362. #define F08_CODE        87
  363. #define F09_CODE        88
  364. #define F10_CODE        89
  365.  
  366.     /* A couple of useful minterms. */
  367.  
  368. #define MINTERM_ZERO        0
  369. #define MINTERM_ONE        ABC | ABNC | ANBC | ANBNC | NABC | NABNC | NANBC | NANBNC
  370. #define MINTERM_COPY        ABC | ABNC | NABC | NABNC
  371. #define MINTERM_NOT_C        ABNC | ANBNC | NABNC | NANBNC
  372. #define MINTERM_B_AND_C        ABC | NABC
  373. #define MINTERM_NOT_B_AND_C    ANBC | NANBC
  374. #define MINTERM_B_OR_C        ABC | ABNC | NABC | NABNC | ANBC | NANBC
  375.  
  376.     /* Printer control bits. */
  377.  
  378. #define PRINT_SERIAL    (1L << 0)
  379. #define PRINT_MODEM    (1L << 1)
  380. #define PRINT_SCREEN    (1L << 2)
  381. #define PRINT_TERMINAL    (1L << 3)
  382. #define PRINT_USERNAME    (1L << 4)
  383. #define PRINT_COMMENT    (1L << 5)
  384. #define PRINT_SIZE    (1L << 6)
  385. #define PRINT_DATE    (1L << 7)
  386. #define PRINT_BITS    (1L << 8)
  387.  
  388.     /* Day of week flags. */
  389.  
  390. #define DAY_MONDAY    (1L << 0)
  391. #define DAY_TUESDAY    (1L << 1)
  392. #define DAY_WEDNESDAY    (1L << 2)
  393. #define DAY_THURSDAY    (1L << 3)
  394. #define DAY_FRIDAY    (1L << 4)
  395. #define DAY_SATURDAY    (1L << 5)
  396. #define DAY_SUNDAY    (1L << 6)
  397.  
  398.     /* These signal masks will make life a bit easier. */
  399.  
  400. #define SIG_WINDOW    (1L << Window -> UserPort -> mp_SigBit)
  401. #define SIG_SERIAL    (ReadPort ? 1L << ReadPort -> mp_SigBit : NULL)
  402. #define SIG_TIMER    (1L << TimePort -> mp_SigBit)
  403. #define SIG_QUEUE    (SpecialQueue -> SigMask)
  404. #define SIG_CHECK    (1L << CheckBit)
  405. #define SIG_WORKBENCH    (1L << WorkbenchPort -> mp_SigBit)
  406. #define SIG_REXX    (1L << TermRexxPort -> mp_SigBit)
  407.  
  408.     /* Task termination and handshake signal. Note: don't try this at
  409.      * home kids, we are all trained professionals here!
  410.      */
  411.  
  412. #define SIG_KILL    SIGBREAKF_CTRL_C
  413. #define SIG_HANDSHAKE    SIGF_SINGLE
  414.  
  415.     /* Double-buffered file server command. */
  416.  
  417. #define    SIG_COMMAND    SIGBREAKF_CTRL_D
  418.  
  419.     /* ARexx break signal. */
  420.  
  421. #define SIG_BREAK    SIGBREAKF_CTRL_D
  422.  
  423.     /* Hotkey reset command. */
  424.  
  425. #define SIG_RESET    SIGBREAKF_CTRL_D
  426.  
  427.     /* Skip dial entry. */
  428.  
  429. #define SIG_SKIP    SIGBREAKF_CTRL_D
  430.  
  431.     /* Status commands. */
  432.  
  433. #define SIG_BELL    SIGBREAKF_CTRL_D
  434. #define SIG_RESETTIME    SIGBREAKF_CTRL_E
  435.  
  436.     /* Buffer special signals. */
  437.  
  438. #define SIG_TOFRONT    SIGBREAKF_CTRL_D
  439. #define SIG_UPDATE    SIGBREAKF_CTRL_E
  440. #define SIG_MOVEUP    SIGBREAKF_CTRL_F
  441.  
  442.     /* Status display task. */
  443.  
  444. #define SIG_CLOSEWINDOW    SIGBREAKF_CTRL_F
  445.  
  446.     /* Upload queue. */
  447.  
  448. #define SIG_SHOW    SIGBREAKF_CTRL_D
  449. #define SIG_HIDE    SIGBREAKF_CTRL_E
  450. #define SIG_GOAWAY    SIGBREAKF_CTRL_F
  451.  
  452.     /* A port signal mask. */
  453.  
  454. #define PORTMASK(P)    (1L << (((struct MsgPort *)(P)) -> mp_SigBit))
  455.  
  456.     /* Replacements for CheckItem() and OnMenu()/OffMenu(). */
  457.  
  458. #define CheckItem(ID,Mode)    SetItem(ID,Mode ? SETITEM_SETCHECK : SETITEM_CLRCHECK)
  459. #define OnItem(ID)        SetItem(ID,SETITEM_ON)
  460. #define OffItem(ID)        SetItem(ID,SETITEM_OFF)
  461.  
  462.     /* A handy signal macro. */
  463.  
  464. #define ClrSignal(Signals)    SetSignal(0,Signals)
  465.  
  466.     /* Another neat macro. */
  467.  
  468. #define NumElements(s)        (sizeof(s) / sizeof((s)[0]))
  469. #define NEW(t)            t = AllocVecPooled(sizeof(* ## t),MEMF_ANY | MEMF_CLEAR)
  470. #define DISPOSE(x)        { FreeVecPooled(x); x = NULL; }
  471.  
  472.     /* Definitions to access the line signal setting functions supported by
  473.      * some IO serial boards (namely the ASDG board).
  474.      */
  475.  
  476. #define SIOCMD_SETCTRLLINES    (CMD_NONSTD + 7)
  477. #define SIOB_RTSB        0
  478. #define SIOB_DTRB        1
  479. #define SIOB_RTSF        (1L << SIOB_RTSB)
  480. #define SIOB_DTRF        (1L << SIOB_DTRB)
  481.  
  482.     /* Turn time of day into `compressed' format. */
  483.  
  484. #define DT_GET_TIME(Hour,Minute) ((Minute) / 10 + (Hour) * 6)
  485.  
  486.     /* Vector offsets for the TimeDate structure. */
  487.  
  488. enum    { DT_FIRST_UNIT,DT_NEXT_UNIT };
  489.  
  490.     /* Multiply lines and columns with the current font size. */
  491.  
  492. #define MUL_X(x)        OffsetXTable[x]
  493. #define MUL_Y(y)        OffsetYTable[y]
  494.  
  495.     /* A handy and short alias. */
  496.  
  497. #define TICK            (CHECKIT | MENUTOGGLE)
  498.  
  499.     /* For now the maximum length of a path/file name. */
  500.  
  501. #define MAX_FILENAME_LENGTH    256
  502.  
  503.     /* The maximum width of a line to be stored in the text buffer. */
  504.  
  505. #define BUFFER_LINE_MAX        255
  506.  
  507.     /* User interface definitions. */
  508.  
  509. #define SZ_AutoWidth    TAG_USER+2    /* Use default width? */
  510. #define SZ_NewColumn    TAG_USER+4    /* Start new column */
  511. #define SZ_Lines    TAG_USER+5    /* Number of lines in object */
  512.  
  513.     /* Box information types. */
  514.  
  515. enum    {    BOX_LEFT,BOX_TOP,BOX_WIDTH,BOX_HEIGHT };
  516.  
  517.     /* Status gadget properties. */
  518.  
  519. #define SGA_FullWidth    (TAG_USER+42)
  520. #define SGA_Mode    (TAG_USER+43)
  521.  
  522.     /* Sizing gadget sizes. */
  523.  
  524. #define SIZE_GADGET_WIDTH_HIGH    18
  525. #define SIZE_GADGET_WIDTH_LOW    13
  526.  
  527.     /* Some windows to be opened on the main screen. */
  528.  
  529. enum    {    WINDOW_PACKET,WINDOW_STATUS,WINDOW_FILE,
  530.         WINDOW_REVIEW,WINDOW_FAST,WINDOW_FONT,
  531.         WINDOW_SCREEN,WINDOW_PERF,WINDOW_MAIN,
  532.  
  533.         WINDOW_COUNT };
  534.  
  535.     /* Window alignment information. */
  536.  
  537. #define WC_ALIGNLEFT    (1<<0)
  538. #define WC_ALIGNRIGHT    (1<<1)
  539. #define WC_ALIGNTOP    (1<<2)
  540. #define WC_ALIGNBOTTOM    (1<<3)
  541. #define WC_EXPANDWIDTH    (1<<4)
  542. #define WC_EXPANDHEIGHT    (1<<5)
  543. #define WC_ALIGNSIDE    (1<<6)
  544. #define WC_ALIGNBELOW    (1<<7)
  545.  
  546.     /* The chat line gadget ID. */
  547.  
  548. #define CHAT_ID        744
  549.  
  550.     /* Screen mode list entry. */
  551.  
  552. struct ModeNode
  553. {
  554.     struct Node    VanillaNode;
  555.     ULONG        DisplayID;
  556. };
  557.  
  558.     /* Trap management. */
  559.  
  560. struct TrapNode
  561. {
  562.     struct Node    Node;
  563.     LONG        Count,
  564.             SequenceLen;
  565.     STRPTR        Sequence,
  566.             Command;
  567. };
  568.  
  569.     /* Trap preferences, not much. */
  570.  
  571. struct TrapSettings
  572. {
  573.     BYTE        Enabled,
  574.             Pad;
  575. };
  576.  
  577.     /* Window alignment data. */
  578.  
  579. struct WindowInfo
  580. {
  581.     UWORD    ID;
  582.     UWORD    WindowFlags;
  583.  
  584.     LONG    Left,
  585.         Top,
  586.         Width,
  587.         Height;
  588. };
  589.  
  590.     /* Special character treatment. */
  591.  
  592. struct SpecialKey
  593. {
  594.     UBYTE    Key;
  595.     BYTE    (*  Routine)(VOID);
  596. };
  597.  
  598.     /* Cursor backup data. */
  599.  
  600. struct CursorData
  601. {
  602.     struct TextFont        *CurrentFont;
  603.     WORD             CursorX,
  604.                  CursorY;
  605.     UBYTE             Charset;
  606.     UBYTE             CharMode[2];
  607.     UBYTE             Attributes;
  608.     UBYTE             FgPen,
  609.                  BgPen;
  610.     UBYTE             Style;
  611. };
  612.  
  613.     /* File transfer information. */
  614.  
  615. struct FileTransferNode
  616. {
  617.     struct MinNode         Node;
  618.     ULONG             Size;
  619.     STRPTR             Name;
  620. };
  621.  
  622. struct FileTransferInfo
  623. {
  624.     struct MinList         FileList;
  625.     ULONG             TotalSize;
  626.     LONG             TotalFiles;
  627.  
  628.     ULONG             DoneSize;
  629.     LONG             DoneFiles;
  630.  
  631.     struct FileTransferNode    *CurrentFile;
  632.     ULONG             CurrentSize;
  633. };
  634.  
  635.     /* Global data link. */
  636.  
  637. struct TermPort
  638. {
  639.     struct MsgPort         ExecNode;
  640.  
  641.     struct Window        *TopWindow;
  642.  
  643.     struct SignalSemaphore     OpenSemaphore;
  644.  
  645.     LONG             ID,OpenCount,HoldIt;
  646.     LONG             Reserved[5];
  647. };
  648.  
  649.     /* Buffer search support. */
  650.  
  651. struct SearchInfo
  652. {
  653.     UBYTE    Distance[256],
  654.         Pattern[256];
  655.     LONG    FoundX,
  656.         FoundY;
  657.     WORD    PatternWidth;
  658.     WORD    Index;
  659.     BOOLEAN    Forward,
  660.         IgnoreCase,
  661.         WholeWords;
  662. };
  663.  
  664. struct SearchContext
  665. {
  666.     struct Window        *SearchWindow;
  667.     struct LayoutHandle    *SearchHandle;
  668.  
  669.     UBYTE             LocalBuffer[256];
  670.     STRPTR             Buffer;
  671.  
  672.     BOOLEAN             Ok;
  673. };
  674.  
  675.     /* Support for optimized scrolling routines. */
  676.  
  677. struct ScrollLineInfo
  678. {
  679.     UWORD             Left,Right,Width,
  680.                  ColourMask;
  681. };
  682.  
  683.     /* A dial list entry. */
  684.  
  685. struct PhoneNode
  686. {
  687.     struct Node         VanillaNode;
  688.  
  689.     UBYTE             LocalName[50];
  690.  
  691.     struct PhoneEntry    *Entry;
  692. };
  693.  
  694.     /* A Fast! macro list entry. */
  695.  
  696. struct MacroNode
  697. {
  698.     struct MacroNode    *mn_Succ;    /* Modeled after the default Node. */
  699.     struct MacroNode    *mn_Pred;
  700.  
  701.     WORD             mn_Pad;    /* Included only for Node compatibility. */
  702.  
  703.     UBYTE            *mn_Macro;    /* = ln_Name, title */
  704.     UBYTE            *mn_Code;    /* The execution code. */
  705. };
  706.  
  707.     /* Speech preferences. */
  708.  
  709. struct SpeechConfig
  710. {
  711.     WORD            Rate,
  712.                 Pitch;
  713.     LONG            Frequency;
  714.     BYTE            Sex,
  715.                 Volume,
  716.                 Enabled,
  717.                 Pad;
  718. };
  719.  
  720.     /* Sound preferences */
  721.  
  722. struct SoundConfig
  723. {
  724.     UBYTE            BellFile[MAX_FILENAME_LENGTH],
  725.  
  726.                 ConnectFile[MAX_FILENAME_LENGTH],
  727.                 DisconnectFile[MAX_FILENAME_LENGTH],
  728.  
  729.                 GoodTransferFile[MAX_FILENAME_LENGTH],
  730.                 BadTransferFile[MAX_FILENAME_LENGTH],
  731.  
  732.                 RingFile[MAX_FILENAME_LENGTH],
  733.                 VoiceFile[MAX_FILENAME_LENGTH];
  734.  
  735.     BYTE            Preload,
  736.                 Pad;
  737.     BYTE            Volume,
  738.                 Pad2;
  739.  
  740.     UBYTE            ErrorNotifyFile[MAX_FILENAME_LENGTH];
  741. };
  742.  
  743.     /* Macro Preferences. */
  744.  
  745. struct MacroKeys
  746. {
  747.     UBYTE            Keys[4][10][256];
  748. };
  749.  
  750.     /* Cursor key preferences. */
  751.  
  752. struct CursorKeys
  753. {
  754.     UBYTE            Keys[4][4][256];
  755. };
  756.  
  757.     /* Translation table entry. */
  758.  
  759. struct TranslationEntry
  760. {
  761.     STRPTR            String;        /* Corresponding code string. */
  762.     UBYTE            Type;        /* Table entry type. */
  763.     UBYTE            Len;        /* String length if any. */
  764.     UBYTE            Extra;        /* Saves space, don't need to allocate memory for this one. */
  765.     UBYTE            Null;        /* Terminating null. */
  766. };
  767.  
  768. struct TranslationHeader
  769. {
  770.     UBYTE            Type;        /* Table entry type. */
  771.     UBYTE            Code;        /* Table offset. */
  772.     UBYTE            Len;        /* Entry length. */
  773.     UBYTE            Pad;
  774. };
  775.  
  776.     /* Buffer translation handle. */
  777.  
  778. struct TranslationHandle
  779. {
  780.     STRPTR            LocalBuffer;
  781.     LONG            LocalLen;
  782.  
  783.     STRPTR            SourceBuffer;
  784.     LONG            SourceLen;
  785.  
  786.     STRPTR            DestinationBuffer;
  787.     LONG            DestinationLen;
  788.  
  789.     struct TranslationEntry    **Table;
  790. };
  791.  
  792.     /* term hotkey configuration. */
  793.  
  794. struct HotkeysOld
  795. {
  796.     UBYTE            termScreenToFront[256];
  797.     UBYTE            BufferScreenToFront[256];
  798.     UBYTE            SkipDialEntry[256];
  799.     BYTE            CommodityPriority;
  800.     BYTE            HotkeysEnabled;
  801.  
  802.     ULONG            Reserved[25];
  803. };
  804.  
  805. struct Hotkeys
  806. {
  807.     UBYTE            termScreenToFront[256];
  808.     UBYTE            BufferScreenToFront[256];
  809.     UBYTE            SkipDialEntry[256];
  810.     BYTE            CommodityPriority;
  811.     BYTE            HotkeysEnabled;
  812.  
  813.     ULONG            Reserved[25];
  814.  
  815.     UBYTE            AbortARexx[256];
  816. };
  817.  
  818.     /* Time/date structure. */
  819.  
  820. struct TimeDate
  821. {
  822.     LONG             Count;        /* Table size. */
  823.     WORD             PayPerUnit[2],    /* Pay for each unit. */
  824.                  SecPerUnit[2];    /* Number of seconds each unit lasts. */
  825.     UBYTE             Time,        /* The time associated with this entry. */
  826.                  Pad;
  827. };
  828.  
  829.     /* Time date header information. */
  830.  
  831. struct TimeDateHeader
  832. {
  833.     UBYTE             Comment[22];    /* Comment for this entry. */
  834.  
  835.     BYTE             Month,        /* Month of year or -1 -> Day = bitmapped days of week. */
  836.                  Day;        /* Day of month or -1 -> standard settings. */
  837. };
  838.  
  839. struct TimeDateNode
  840. {
  841.     struct Node         VanillaNode;    /* Default node entry. */
  842.     UBYTE             Buffer[30];    /* Name buffer. */
  843.  
  844.     struct TimeDate        *Table;        /* Table of time/date entries. */
  845.  
  846.     struct TimeDateHeader     Header;    /* Header information. */
  847. };
  848.  
  849. struct TimeNode
  850. {
  851.     struct Node         VanillaNode;    /* Default node entry. */
  852.     UBYTE             Name[20];    /* Name string. */
  853.     UBYTE             Time;        /* The time for this entry. */
  854. };
  855.  
  856.     /* This node type links phone number patterns
  857.      * and date/time lists.
  858.      */
  859.  
  860. struct PatternNode
  861. {
  862.     struct Node        Node;
  863.     UBYTE            Pattern[256],
  864.                 Comment[40];
  865.     struct List        List;
  866. };
  867.  
  868.     /* Serial settings. */
  869.  
  870. struct SerialSettings
  871. {
  872.     ULONG    BaudRate;        /* Baud rate. */
  873.     ULONG    BreakLength;        /* Length of break signal in microseconds. */
  874.     ULONG    SerialBufferSize;    /* Size of serial read/write buffer. */
  875.  
  876.     UBYTE    SerialDevice[MAX_FILENAME_LENGTH];
  877.                     /* Serial device name. */
  878.     LONG    UnitNumber;        /* Serial device unit number. */
  879.  
  880.     BYTE    BitsPerChar;        /* Bits per character. */
  881.     BYTE    Parity;            /* Parity check mode. */
  882.     BYTE    StopBits;        /* Number of stop bits. */
  883.     BYTE    HandshakingProtocol;    /* Handshaking protocol (RTS/CTS, etc.). */
  884.     BYTE    Duplex;            /* Full- or half-duplex? */
  885.  
  886.     BYTE    xONxOFF;        /* xON/xOFF handshaking enabled? */
  887.     BYTE    HighSpeed;        /* Radboogie? */
  888.     BYTE    Shared;            /* Shared device access? */
  889.     BYTE    StripBit8;        /* Strip high-order bit? */
  890.     BYTE    CheckCarrier;        /* Track the carrier signal? */
  891.     BYTE    PassThrough;        /* Pass xON/xOFF characters through to modem? */
  892.     BYTE    UseOwnDevUnit;        /* Enable OwnDevUnit.library? */
  893.  
  894.     ULONG    Quantum;        /* Buffer read quantum. */
  895.  
  896.     BYTE    IgnoreCarrier;        /* Ignore carrier signal. */
  897.  
  898.     BYTE    UseNet;            /* Use DNet-ID. */
  899.     UWORD    NetID;            /* The DNet-ID to use. */
  900.  
  901.     BYTE    SatisfyODURequests;    /* How to satisfy ODU requests. */
  902.     BYTE    DirectConnection;    /* Directly connected to host? */
  903.  
  904.     UWORD    LastVersionSaved,    /* The last version the config file was saved with. */
  905.         LastRevisionSaved;
  906.  
  907.     BYTE    ReleaseODUWhenOnline;    /* Release the device even when online? */
  908.     BYTE    ReleaseODUWhenDialing;    /* Release the device even when dialing? */
  909.     BYTE    NoODUIfShared;        /* Don't use ODU when device is opened in shared mode? */
  910.     BYTE    Pad;
  911. };
  912.  
  913.     /* Modem settings. */
  914.  
  915. struct ModemSettings
  916. {
  917.     UBYTE    ModemInit[80];        /* Modem init string. */
  918.     UBYTE     ModemExit[80];        /* Modem exit string. */
  919.     UBYTE     ModemHangup[80];    /* Modem hangup string. */
  920.     UBYTE    DialPrefix[80];        /* Dial command prefix. */
  921.     UBYTE    DialSuffix[80];        /* Dial command suffix. */
  922.  
  923.     UBYTE    NoCarrier[16];        /* `No carrier' string. */
  924.     UBYTE    NoDialTone[16];        /* `No dialtone' string. */
  925.     UBYTE    Connect[16];        /* `Connect' string. */
  926.     UBYTE    Voice[16];        /* `Voice' string. */
  927.     UBYTE    Ring[16];        /* `Ring' string. */
  928.     UBYTE    Busy[16];        /* `Busy' string. */
  929.  
  930.     LONG    RedialDelay;        /* Length of redial delay. */
  931.     LONG    DialRetries;        /* Number of dial retries. */
  932.     LONG    DialTimeout;        /* Length of dial timeout. */
  933.     BYTE    ConnectAutoBaud;    /* Use baud rate returned by modem? */
  934.     BYTE    DropDTR;        /* Drop the DTR signal on hangup? */
  935.     BYTE    RedialAfterHangup;    /* Redial list after hangup? */
  936.     BYTE    VerboseDialing;        /* Output modem responses while dialing? */
  937.  
  938.     UBYTE    Ok[16];            /* `Ok' string. */
  939.     UBYTE    Error[16];        /* `Error' string. */
  940.  
  941.     BYTE    NoCarrierIsBusy;    /* Treat `NO CARRIER' as `BUSY' signal? */
  942.     BYTE    AbortHangsUp;        /* Dialer `Abort' sends hangup string? */
  943.  
  944.     WORD    ConnectLimit;                /* Connection limit. */
  945.     UBYTE    ConnectLimitMacro[MAX_FILENAME_LENGTH];    /* Macro to be executed when limit is reached. */
  946.  
  947.     LONG    TimeToConnect;        /* Number of seconds to pass between modem picking up
  948.                      * the line and issuing the `CONNECT' message.
  949.                      */
  950.  
  951.     BYTE    DialMode;        /* Use tone or pulse dialing? */
  952.     BYTE    DoNotSendMainModemCommands;    /* Do not send modem init/exit commands when dialing and using the main configuration? */
  953.  
  954.     LONG    InterDialDelay;        /* Seconds to wait between two successive dial attempts. */
  955.  
  956.     LONG    CharSendDelay;        /* Microseconds to wait between chars to send. */
  957.  
  958.     UBYTE    PBX_Prefix[80];        /* Additional commands to insert between dial prefix and phone number. */
  959.     BYTE    PBX_Mode;        /* Send the prefix above. */
  960.     BYTE    Pad;
  961. };
  962.  
  963.     /* Command settings. */
  964.  
  965. struct CommandSettings
  966. {
  967.     UBYTE    StartupMacro[256];    /* Startup macro. */
  968.     UBYTE    LogoffMacro[256];    /* Macro executed after carrier has dropped or hung up. */
  969.     UBYTE    UploadMacro[256];    /* Macro to execute after a successful upload. */
  970.     UBYTE    DownloadMacro[256];    /* Macro to execute after a successful download. */
  971.  
  972.     UBYTE    LoginMacro[256];    /* Login macro, complements the logoff macro. */
  973. };
  974.  
  975.     /* Screen settings. */
  976.  
  977. struct ScreenSettings
  978. {
  979.     ULONG    DisplayMode;            /* Screen display mode. */
  980.     WORD    ColourMode;            /* The terminal colour mode. */
  981.     UWORD    Colours[16];            /* Colour palette. */
  982.     UBYTE    FontName[MAX_FILENAME_LENGTH];    /* Default user interface font. */
  983.     WORD    FontHeight;            /* Default user interface font height. */
  984.  
  985.     BYTE    MakeScreenPublic;        /* Are we to make our screen public? */
  986.     BYTE    ShanghaiWindows;        /* Are we to `shanghai' windows? */
  987.  
  988.     BYTE    Blinking;            /* Screen blinking enabled? */
  989.     BYTE    FasterLayout;            /* Faster screen layout? */
  990.     BYTE    TitleBar;            /* Is the screen title bar enabled? */
  991.     BYTE    StatusLine;            /* Which mode is the status line in? */
  992.  
  993.     BYTE    UseWorkbench;            /* Use the Workbench screen for the terminal window? */
  994.  
  995.     UBYTE    PubScreenName[MAXPUBSCREENNAME + 1];    /* Name of public screen to open window upon. */
  996.  
  997.     BYTE    TimeMode;            /* Online time/fee display. */
  998.     BYTE    Depth;                /* Screen depth if any, 0 = don't bother. */
  999.  
  1000.     BYTE    UsePens;            /* Use special screen pens? */
  1001.     BYTE    PenColourMode;            /* For which colour mode was the pen array built? */
  1002.  
  1003.     UWORD    PenArray[16];            /* Pen index array. */
  1004.  
  1005.     ULONG    DisplayWidth,            /* Screen width. */
  1006.         DisplayHeight;            /* Screen height. */
  1007.     UWORD    OverscanType;            /* Screen overscan type. */
  1008.  
  1009.     BYTE    ShareScreen;            /* Don't open a backdrop window, share pens. */
  1010.     BYTE    SplitStatus;            /* Split the status line from the main window. */
  1011.  
  1012.     BYTE    Pad;
  1013.     BYTE    UseColours96;            /* Use the 96 bit colours? */
  1014.     ULONG    Colours96[16 * 3];        /* The 96 bit colour table. */
  1015. };
  1016.  
  1017.     /* Terminal settings. */
  1018.  
  1019. struct TerminalSettings
  1020. {
  1021.     BYTE    BellMode;                /* The bell mode. */
  1022.     BYTE    AlertMode;                /* The user alert mode. */
  1023.     BYTE    EmulationMode;                /* The terminal emulation mode. */
  1024.     BYTE    FontMode;                /* The font mode. */
  1025.  
  1026.     BYTE    SendCR;                    /* Standard translations. */
  1027.     BYTE    SendLF;
  1028.     BYTE    ReceiveCR;
  1029.     BYTE    ReceiveLF;
  1030.  
  1031.     UWORD    NumColumns,                /* Size of the terminal window. */
  1032.         NumLines;
  1033.  
  1034.     UBYTE    KeyMapFileName[MAX_FILENAME_LENGTH];    /* Name of custom keymap file. */
  1035.     UBYTE    EmulationFileName[MAX_FILENAME_LENGTH];    /* External emulation file name. */
  1036.     UBYTE    BeepFileName[MAX_FILENAME_LENGTH];    /* Name of the custom beep sound file. */
  1037.  
  1038.     UBYTE    TextFontName[MAX_FILENAME_LENGTH];    /* Terminal text font name. */
  1039.     WORD    TextFontHeight;                /* Terminal text font height. */
  1040.  
  1041.     BYTE    UseTerminalTask;            /* Enable the terminal emulation process. */
  1042.     BYTE    Pad;
  1043.  
  1044.     UBYTE    IBMFontName[MAX_FILENAME_LENGTH];    /* Terminal text font name. */
  1045.     WORD    IBMFontHeight;                /* Terminal text font height. */
  1046. };
  1047.  
  1048.     /* Path settings. */
  1049.  
  1050. struct PathSettings
  1051. {
  1052.     UBYTE    ASCIIUploadPath[MAX_FILENAME_LENGTH];        /* Default ASCII upload file path. */
  1053.     UBYTE    ASCIIDownloadPath[MAX_FILENAME_LENGTH];        /* Default ASCII download file path. */
  1054.  
  1055.     UBYTE    TextUploadPath[MAX_FILENAME_LENGTH];        /* Default text upload file path. */
  1056.     UBYTE    TextDownloadPath[MAX_FILENAME_LENGTH];        /* Default text download file path. */
  1057.  
  1058.     UBYTE    BinaryUploadPath[MAX_FILENAME_LENGTH];        /* Default binary data upload file path. */
  1059.     UBYTE    BinaryDownloadPath[MAX_FILENAME_LENGTH];    /* Default binary data download file path. */
  1060.  
  1061.     UBYTE    DefaultStorage[MAX_FILENAME_LENGTH];        /* Default configuration storage path. */
  1062.  
  1063.     UBYTE    Editor[MAX_FILENAME_LENGTH];            /* Text file editor to use. */
  1064.  
  1065.     UBYTE    HelpFile[MAX_FILENAME_LENGTH];            /* Help text file. */
  1066. };
  1067.  
  1068.     /* Miscellaneous settings. */
  1069.  
  1070. struct MiscSettings
  1071. {
  1072.     BYTE    Priority;        /* Program priority. */
  1073.     BYTE    BackupConfig;        /* Save the configuration between calls? */
  1074.  
  1075.     BYTE    OpenFastMacroPanel;    /* Open the fast! macro panel? */
  1076.     BYTE    ReleaseDevice;        /* Release serial device when iconified? */
  1077.  
  1078.     BYTE    TransferServer;        /* Enable data transfer server? */
  1079.     BYTE    EmulationServer;    /* Enable terminal emulation server? */
  1080.  
  1081.     BYTE    OverridePath;        /* Override the protocol transfer path? */
  1082.     BYTE    AutoUpload;        /* Enable the auto-upload panel? */
  1083.     BYTE    SetArchivedBit;        /* Set the archived bit for files sent? */
  1084.     BYTE    IdentifyFiles;        /* Try to identify files after download? */
  1085.  
  1086.     BYTE    TransferIcons;        /* Transfer files along with their icons? */
  1087.     BYTE    CreateIcons;        /* Create icons for files saved? */
  1088.  
  1089.     BYTE    SimpleIO;        /* Use simple file I/O? */
  1090.     BYTE    PerfMeter;        /* Transfer performance meter enabled? */
  1091.  
  1092.     LONG    IOBufferSize;        /* Size of the asynchronous I/O buffer. */
  1093.  
  1094.     BYTE    HideUploadIcon;        /* Hide the upload queue icon? */
  1095.     BYTE    ProtectiveMode;        /* Give hints and ask for confirmation? */
  1096.  
  1097.     BYTE    AlertMode;        /* The user alert mode. */
  1098.  
  1099.     BYTE    RequesterMode;        /* Centre, ignore, use preference? */
  1100.  
  1101.     UWORD    RequesterWidth,        /* Width of asl requesters. */
  1102.         RequesterHeight;    /* Height of asl requesters. */
  1103.     UWORD    RequesterLeft,        /* Left edge of asl requesters. */
  1104.         RequesterTop;        /* Top edge of asl requesters. */
  1105. };
  1106.  
  1107.     /* Clipboard settings. */
  1108.  
  1109. struct ClipSettings
  1110. {
  1111.     WORD    ClipboardUnit;        /* Clipboard unit to use. */
  1112.  
  1113.     WORD    LineDelay,        /* Insert line delay. */
  1114.         CharDelay;        /* Insert character delay. */
  1115.  
  1116.     UBYTE    InsertPrefix[80];    /* Line insertion prefix. */
  1117.     UBYTE    InsertSuffix[80];    /* Line insertion suffix. */
  1118.  
  1119.     UBYTE    LinePrompt[256];    /* Line wait prompt. */
  1120.     WORD    SendTimeout;        /* Line send timeout. */
  1121.     UBYTE    PacingMode;        /* Text pacing mode. */
  1122.     BYTE    ConvertLF;        /* Convert <LF> characters to <CR> */
  1123. };
  1124.  
  1125.     /* Capture and logfile settings. */
  1126.  
  1127. struct CaptureSettings
  1128. {
  1129.     BYTE    LogActions;                /* Create logfile? */
  1130.     BYTE    LogCall;                /* Create callinfo-compatible logfile? */
  1131.     UBYTE    LogFileName[MAX_FILENAME_LENGTH];    /* Default logfile name. */
  1132.  
  1133.     LONG    MaxBufferSize;                /* Maximum text buffer size. */
  1134.     BYTE    BufferEnabled;                /* Is the text buffer enabled? */
  1135.  
  1136.     BYTE    ConnectAutoCapture;            /* Open capture file on logon? */
  1137.     BYTE    CaptureFilterMode;            /* The capture filter mode. */
  1138.     UBYTE    CapturePath[MAX_FILENAME_LENGTH];    /* The default path for capture files. */
  1139.  
  1140.     UBYTE    CallLogFileName[MAX_FILENAME_LENGTH];    /* Name of the call log file. */
  1141.     UBYTE    BufferPath[MAX_FILENAME_LENGTH];    /* Text buffer save path. */
  1142.  
  1143.     BYTE    AutoCaptureDate;            /* Where to include the creation date? */
  1144.     UBYTE    SearchHistory;
  1145.  
  1146.     BYTE    OpenBufferWindow;            /* Where to open the buffer window. */
  1147.     BYTE    OpenBufferScreen;            /* Where to open the buffer screen. */
  1148.  
  1149.     BYTE    BufferScreenPosition;            /* Where to place the buffer screen (horizontal) */
  1150.     UBYTE    BufferWidth;                /* How long each line in the buffer should be. */
  1151.  
  1152.     BYTE    RememberBufferWindow;            /* Remember buffer window context? */
  1153.     BYTE    RememberBufferScreen;            /* Remember buffer screen context? */
  1154.  
  1155.     ULONG    BufferScreenMode;            /* Screen display mode for buffer screen. */
  1156.  
  1157.     BYTE    ConvertChars;                /* Convert IBM characters? */
  1158.     BYTE    BufferMode;                /* How the capture buffer should receive data. */
  1159. };
  1160.  
  1161.     /* File settings. */
  1162.  
  1163. struct FileSettings
  1164. {
  1165.     UBYTE    ProtocolFileName[MAX_FILENAME_LENGTH];        /* Transfer protocol file name. */
  1166.     UBYTE    TranslationFileName[MAX_FILENAME_LENGTH];    /* Character translation file name. */
  1167.     UBYTE    MacroFileName[MAX_FILENAME_LENGTH];        /* Keyboard macro file name. */
  1168.     UBYTE    CursorFileName[MAX_FILENAME_LENGTH];        /* Cursor key file name. */
  1169.     UBYTE    FastMacroFileName[MAX_FILENAME_LENGTH];        /* Fast macro file name. */
  1170. };
  1171.  
  1172.     /* Emulation settings. */
  1173.  
  1174. struct EmulationSettings
  1175. {
  1176.     BYTE    CursorMode;        /* Are the cursor keys switched to application mode? */
  1177.     BYTE    NumericMode;        /* Is the numeric keypad switched to application mode? */
  1178.  
  1179.     BYTE    CursorWrap;        /* Is cursor position wrapping enabled? */
  1180.     BYTE    LineWrap;        /* Is character line wrapping enabled? */
  1181.  
  1182.     BYTE    InsertMode;        /* Is the character insertion mode enabled? */
  1183.     BYTE    NewLineMode;        /* Is the newline mode enabled? */
  1184.  
  1185.     BYTE    FontScale;        /* Which font scale is enabled? */
  1186.     BYTE    ScrollMode;        /* Is smooth scrolling enabled? */
  1187.     BYTE    DestructiveBackspace;    /* Backspace erases characters? */
  1188.     BYTE    SwapBSDelete;        /* DEL and BS keys are swapped? */
  1189.     BYTE    PrinterEnabled;        /* Printer commands enabled? */
  1190.     BYTE    CLSResetsCursor;    /* Clear screen command resets cursor position? */
  1191.  
  1192.     UBYTE    AnswerBack[80];        /* Answer-back message. */
  1193.  
  1194.     BYTE    KeysLocked;        /* Numeric keypad mode locked? */
  1195.     UBYTE    MaxScroll;        /* Maximum number of lines to prescroll. */
  1196.     UBYTE    MaxJump;        /* Maximum number of lines to scroll in one jump. */
  1197.     BYTE    CursorLocked;        /* Cursor keys locked? */
  1198.     BYTE    FontLocked;        /* Font size locked? */
  1199.     BYTE    LockWrapping;        /* Line wrapping locked? */
  1200.     BYTE    LockStyle;        /* Text style locked? */
  1201.     BYTE    LockColour;        /* Text colour locked? */
  1202.  
  1203.     BYTE    UseStandardPens;    /* Use the standard pens/attributes? */
  1204.     BYTE    TerminalType;        // How to identify ourselves (VT100 or VT200)
  1205.  
  1206.     UBYTE    Attributes[4];        /* Attribute mappings. */
  1207.     UWORD    Pens[16];        /* Rendering pens. */
  1208. };
  1209.  
  1210. struct TransferSignature
  1211. {
  1212.     UBYTE    Signature[40];
  1213.     WORD    Length;
  1214. };
  1215.  
  1216.     /* File transfer library settings. */
  1217.  
  1218. struct TransferSettings
  1219. {
  1220.     UBYTE    DefaultLibrary[MAX_FILENAME_LENGTH],
  1221.         ASCIIUploadLibrary[MAX_FILENAME_LENGTH],
  1222.         ASCIIDownloadLibrary[MAX_FILENAME_LENGTH],
  1223.         TextUploadLibrary[MAX_FILENAME_LENGTH],
  1224.         TextDownloadLibrary[MAX_FILENAME_LENGTH],
  1225.         BinaryUploadLibrary[MAX_FILENAME_LENGTH],
  1226.         BinaryDownloadLibrary[MAX_FILENAME_LENGTH];
  1227.     BYTE    InternalASCIIUpload,
  1228.         InternalASCIIDownload,
  1229.         QuietTransfer,
  1230.         MangleFileNames;
  1231.  
  1232.     WORD    LineDelay,        /* Insert line delay. */
  1233.         CharDelay;        /* Insert character delay. */
  1234.  
  1235.     UBYTE    LinePrompt[256];    /* Line wait prompt. */
  1236.     WORD    SendTimeout;        /* Line send timeout. */
  1237.     UBYTE    PacingMode;        /* Text pacing mode. */
  1238.     BYTE    StripBit8;        /* Strip high order bit. */
  1239.     BYTE    IgnoreDataPastArnold;    /* Ignore data past terminator. */
  1240.     UBYTE    TerminatorChar;        /* Terminator character. */
  1241.     BYTE    SendCR,
  1242.         SendLF,
  1243.         ReceiveCR,
  1244.         ReceiveLF;
  1245.  
  1246.     UWORD    ErrorNotification;    /* Notify user after <n> errors have occured. */
  1247.     BYTE    TransferNotification;    /* Notify the user when a transfer has started/finished? */
  1248.     BYTE    DefaultType,
  1249.         ASCIIDownloadType,
  1250.         ASCIIUploadType,
  1251.         TextDownloadType,
  1252.         TextUploadType,
  1253.         BinaryUploadType,
  1254.         BinaryDownloadType;
  1255.  
  1256.     struct TransferSignature Signatures[TRANSFERSIG_BINARYDOWNLOAD + 1];
  1257.  
  1258.     BYTE    OverridePath;        /* Override the protocol transfer path? */
  1259.     BYTE    SetArchivedBit;        /* Set the archived bit for files sent? */
  1260.     BYTE    IdentifyFiles;        /* Try to identify files after download? */
  1261.     BYTE    TransferIcons;        /* Transfer files along with their icons? */
  1262.     BYTE    PerfMeter;        /* Transfer performance meter enabled? */
  1263.     BYTE    HideUploadIcon;        /* Hide the upload queue icon? */
  1264. };
  1265.  
  1266.     /* The new configuration settings. */
  1267.  
  1268. struct Configuration
  1269. {
  1270.     struct SerialSettings        *SerialConfig;
  1271.     struct ModemSettings        *ModemConfig;
  1272.     struct ScreenSettings        *ScreenConfig;
  1273.     struct TerminalSettings        *TerminalConfig;
  1274.     struct EmulationSettings    *EmulationConfig;
  1275.     struct ClipSettings        *ClipConfig;
  1276.     struct CaptureSettings        *CaptureConfig;
  1277.     struct CommandSettings        *CommandConfig;
  1278.     struct MiscSettings        *MiscConfig;
  1279.     struct PathSettings        *PathConfig;
  1280.     struct FileSettings        *FileConfig;
  1281.     struct TransferSettings        *TransferConfig;
  1282.  
  1283.     STRPTR                TranslationFileName;
  1284.     STRPTR                MacroFileName;
  1285.     STRPTR                CursorFileName;
  1286.     STRPTR                FastMacroFileName;
  1287. };
  1288.  
  1289.     /* Phonebook entry header. */
  1290.  
  1291. struct PhoneHeader
  1292. {
  1293.     UBYTE        Name[40],        /* BBS name. */
  1294.             Number[100],        /* Phone number. */
  1295.             Comment[100];        /* Comment. */
  1296.  
  1297.     UBYTE        UserName[100],        /* User name for this BSS. */
  1298.             Password[100];        /* Password for user name. */
  1299.  
  1300.     BOOLEAN        QuickMenu;        /* This entry appears in the quick dial menu? */
  1301.     BOOLEAN        NoRates;        /* Do not use rate information. */
  1302.  
  1303.     ULONG        ID;            /* Unique ID of this entry. */
  1304.  
  1305.     struct timeval    Creation;        /* Creation time. */
  1306.  
  1307.     BOOLEAN        AutoDial;        /* Put this entry on the autodial list. */
  1308.     BOOLEAN        Pad;
  1309. };
  1310.  
  1311.     /* A phonebook entry. */
  1312.  
  1313. struct PhoneEntry
  1314. {
  1315.     struct PhoneNode    *Node;
  1316.  
  1317.     struct MinList         TimeDateList;
  1318.  
  1319.     LONG             Count;
  1320.  
  1321.     struct PhoneGroupNode    *ThisGroup;
  1322.     struct PhoneNode    *NodeGroup;
  1323.  
  1324.     struct PhoneHeader    *Header;
  1325.     struct Configuration    *Config;
  1326. };
  1327.  
  1328.     /* A text box for several lines of text. */
  1329.  
  1330. struct TextBox
  1331. {
  1332.     struct TextBox        *NextBox;        /* Next box in chain. */
  1333.  
  1334.     LONG             Left,Top,        /* Position and size. */
  1335.                  Width,Height;
  1336.  
  1337.     LONG             LineWidth,        /* Line width in pixels. */
  1338.                  LineHeight;        /* Line height in pixels. */
  1339.  
  1340.     LONG             NumChars,        /* Number of chars per line. */
  1341.                  NumLines;        /* Number of lines. */
  1342.  
  1343.     STRPTR            *Title,            /* Line titles. */
  1344.                 *Text;            /* Line texts. */
  1345.  
  1346.     LONG             TitleFgPen,
  1347.                  TitleBgPen,
  1348.                  TextPen;
  1349. };
  1350.  
  1351.     /* Block marker structure. */
  1352.  
  1353. struct BlockMarker
  1354. {
  1355.         /* The object to manipulate. */
  1356.  
  1357.     APTR            Object;
  1358.  
  1359.         /* Selection and unselection routines. */
  1360.  
  1361.     VOID         (* Select)(struct BlockMarker *Marker,LONG Left,LONG Top,LONG Width,LONG Height);
  1362.     VOID         (* Unselect)(struct BlockMarker *Marker,LONG Left,LONG Top,LONG Width,LONG Height);
  1363.  
  1364.         /* Origin anchor point. */
  1365.  
  1366.     LONG            OriginX,
  1367.                 OriginY;
  1368.  
  1369.         /* First and last selected line. */
  1370.  
  1371.     LONG            FirstLine,
  1372.                 LastLine;
  1373.  
  1374.         /* First and last selected column. */
  1375.  
  1376.     LONG            FirstColumn,
  1377.                 LastColumn;
  1378.  
  1379.         /* Top of display window, lines in the buffer and size of
  1380.          * the display window.
  1381.          */
  1382.  
  1383.     LONG            Top,
  1384.                 Lines,
  1385.                 Width,
  1386.                 Height;
  1387.  
  1388.         /* Canvas left and top edge. */
  1389.  
  1390.     LONG            LeftEdge,
  1391.                 TopEdge;
  1392.  
  1393.         /* Last mouse position. */
  1394.  
  1395.     LONG            LastX,
  1396.                 LastY;
  1397.  
  1398.         /* Single character dimensions. */
  1399.  
  1400.     LONG            TextFontWidth,
  1401.                 TextFontHeight;
  1402.  
  1403.         /* Plane write mask. */
  1404.  
  1405.     UBYTE            WriteMask;
  1406. };
  1407.  
  1408.     /* Global data flow <-> term interface. */
  1409.  
  1410. struct FlowInfo
  1411. {
  1412.     BYTE            Changed;
  1413.  
  1414.     BYTE            NoCarrier;
  1415.  
  1416.     BYTE            Connect,
  1417.                 Voice,
  1418.                 Ring,
  1419.                 Busy,
  1420.                 NoDialTone,
  1421.                 Ok,
  1422.                 Error;
  1423.  
  1424.     BYTE            Signature;
  1425. };
  1426.  
  1427.     /* A scan sequence, somewhat similar to the FlowInfo structure. */
  1428.  
  1429. struct WaitNode
  1430. {
  1431.     struct Node    Node;
  1432.     LONG        Count;        /* Number of characters matched. */
  1433.     STRPTR        Response;    /* Immediate response. */
  1434.     LONG        ResponseLen;    /* Length of immediate response string. */
  1435. };
  1436.  
  1437. struct DialNode
  1438. {
  1439.     struct Node         Node;        // List link
  1440.     struct PhoneEntry    *Entry;        // Points to the configuration data
  1441. };
  1442.  
  1443.     /* A list as employed by the ARexx interface. */
  1444.  
  1445. struct GenericList
  1446. {
  1447.     struct MinList         ListHeader;
  1448.     struct Node        *ListNode;
  1449.     LONG             ListCount;
  1450.     struct SignalSemaphore     ListSemaphore;
  1451. };
  1452.  
  1453.     /* Number of buffers to be used for buffered I/O. */
  1454.  
  1455. #define BUFFER_NUMBER        2
  1456.  
  1457.     /* Auxiliary structure for buffered file I/O. */
  1458.  
  1459. struct Buffer
  1460. {
  1461.     struct Message             Message;            /* Vanilla message header. */
  1462.  
  1463.     BYTE                 SimpleIO;            /* Real simple I/O? */
  1464.     BYTE                 Pad;
  1465.  
  1466.     BYTE                 Read;                /* Last access has read data. */
  1467.     BYTE                 Written;            /* Last access has written data. */
  1468.  
  1469.     LONG                 Action;            /* Action to perform. */
  1470.     LONG                 ActionData[2];            /* Seek and the like. */
  1471.     LONG                 Result;            /* Return value. */
  1472.  
  1473.     BPTR                 FileHandle;            /* Dos filehandle. */
  1474.  
  1475.     UBYTE                *Data;                /* Data buffer. */
  1476.     LONG                 BufLength;            /* Length of data buffer. */
  1477.  
  1478.     LONG                 BufPosition;            /* Read/write pointer into buffer. */
  1479.  
  1480.     LONG                 ReadBufFull;            /* How many bytes are still to be read from the buffer? */
  1481.     LONG                 WriteBufFull;            /* How many bytes are still to be written to the buffer?*/
  1482.  
  1483.     LONG                 RealPosition;            /* Real position in file. */
  1484.     LONG                 Cached;            /* How many bytes in pre-load cache. */
  1485.  
  1486.     UBYTE                *DataBuffer[BUFFER_NUMBER];    /* The data buffers. */
  1487.     LONG                 DataLength[BUFFER_NUMBER];    /* The lengths of the data buffers. */
  1488.     WORD                 DataCount;            /* Which buffer to use. */
  1489.     BYTE                 WriteAccess;            /* TRUE if a write file handle. */
  1490.     BYTE                 LastActionFailed;        /* TRUE if last action failed -> abort actions. */
  1491.  
  1492.     struct Process            *Child;
  1493.     struct Process            *Caller;            /* Synchronization. */
  1494.  
  1495.     struct MsgPort            *InfoPort;            /* The filing system the destination file handle is bound to. */
  1496.     struct InfoData __aligned     InfoData;
  1497.  
  1498.     BYTE                 Fresh;                /* TRUE if no read/write access has taken place yet. */
  1499.     BYTE                 Used;                /* Did any access take place at all? */
  1500.  
  1501.     struct DateStamp         OpenDate;            /* Date and time when file was opened. */
  1502. };
  1503.  
  1504.     /* xpr serial bits. */
  1505.  
  1506. #define ST_PARTYON    (1L << 0)
  1507. #define ST_PARTYODD    (1L << 1)
  1508. #define ST_7WIRE    (1L << 2)
  1509. #define ST_QBREAK    (1L << 3)
  1510. #define ST_RADBOOGIE    (1L << 4)
  1511. #define ST_SHARED    (1L << 5)
  1512. #define ST_EOFMODE    (1L << 6)
  1513. #define ST_XDISABLED    (1L << 7)
  1514. #define ST_PARTYMARKON    (1L << 8)
  1515. #define ST_PARTYMARK    (1L << 9)
  1516. #define ST_2BITS    (1L << 10)
  1517. #define ST_READ7    (1L << 11)
  1518. #define ST_WRITE7    (1L << 12)
  1519.  
  1520.     /* Miscellaneous definitions. */
  1521.  
  1522. #define MILLION        1000000
  1523.  
  1524.     /* Raster text line attributes. */
  1525.  
  1526. #define    ATTR_UNDERLINE    1
  1527. #define    ATTR_HIGHLIGHT    2
  1528. #define ATTR_BLINK    4
  1529. #define    ATTR_INVERSE    8
  1530.  
  1531. enum    {    TEXTATTR_UNDERLINE,TEXTATTR_HIGHLIGHT,
  1532.         TEXTATTR_BLINK,TEXTATTR_INVERSE,
  1533.         TEXTATTR_NONE
  1534.     };
  1535.  
  1536.     /* Audio channels. */
  1537.  
  1538. #define LEFT0F  1
  1539. #define RIGHT0F  2
  1540. #define RIGHT1F  4
  1541. #define LEFT1F  8
  1542.  
  1543.     /* Program revision and the appropriate info structure. */
  1544.  
  1545. struct TermInfo
  1546. {
  1547.     UWORD    Version;
  1548.     UWORD    Revision;
  1549. };
  1550.  
  1551. /**********************************************************************/
  1552.  
  1553.  
  1554.     // This defines the destructor data type
  1555.  
  1556. typedef VOID (* __stdargs DESTRUCTOR)(struct MsgItem *);
  1557.  
  1558.     // A message queue handle
  1559.  
  1560. struct MsgQueue
  1561. {
  1562.     struct SignalSemaphore     Access;    // Access semaphore
  1563.     struct MinList         MsgList;    // This is where the queue items go
  1564.  
  1565.     LONG             QueueSize,    // The length of the queue
  1566.                  MaxSize;    // The maximum size of the queue, may be 0
  1567.  
  1568.     struct MinList         WaitList;    // The list of tasks to wait for a wakeup signal
  1569.  
  1570.     struct Task        *SigTask;    // The owner of this handle
  1571.     ULONG             SigMask;    // The signal mask to wake up the owner
  1572.     WORD             SigBit;    // The bit allocated for the mask, may be -1
  1573.  
  1574.     BOOL             Discard;    // Discard or queue new items?
  1575. };
  1576.  
  1577.     // A message item as used by the queue manager
  1578.  
  1579. struct MsgItem
  1580. {
  1581.     struct MinNode         Link;        // List node link
  1582.     DESTRUCTOR         Destructor;    // Destructor routine if any
  1583. };
  1584.  
  1585.     // Your simple message item destructor setup
  1586.  
  1587. #define InitMsgItem(Item,Dest)    (((struct MsgItem *)Item) -> Destructor = (Dest))
  1588.  
  1589.  
  1590. /**********************************************************************/
  1591.  
  1592.  
  1593. enum    {    DATAMSGTYPE_WRITE,DATAMSGTYPE_WRITECLIP,
  1594.         DATAMSGTYPE_UPDATEREVIEW,DATAMSGTYPE_MOVEREVIEW,
  1595.         DATAMSGTYPE_SERIALCOMMAND,DATAMSGTYPE_UPLOAD,
  1596.         DATAMSGTYPE_COMMANDDONE,DATAMSGTYPE_MENU,
  1597.         DATAMSGTYPE_RENDEZVOUS,DATAMSGTYPE_SERIALCOMMANDNOECHO,
  1598.         DATAMSGTYPE_CLEARBUFFER
  1599.     };
  1600.  
  1601.     // An extension of the MsgItem data type
  1602.  
  1603. struct DataMsg
  1604. {
  1605.     struct MsgItem    Item;    // The message item link
  1606.  
  1607.     LONG        Type;    // Message type
  1608.     UBYTE *        Data;    // Pointer to data area
  1609.     LONG        Size;    // Size of data area
  1610.  
  1611.     struct Task *    Client;    // Client task to signal
  1612.     ULONG        Mask;    // Client signal mask
  1613. };
  1614.  
  1615.     // An extension of the DataMsg data type
  1616.  
  1617. struct DataReplyMsg
  1618. {
  1619.     struct DataMsg    Data;        // DataMsg link
  1620.  
  1621.     struct Task *    Creator;    // Creator to notify
  1622.     ULONG        CreatorMask;    // Creator notification signal
  1623. };
  1624.  
  1625.  
  1626. /**********************************************************************/
  1627.  
  1628.  
  1629.     // Serial device attributes
  1630.  
  1631. #define SERA_Baud        TAG_USER+1    // Baud rate
  1632. #define SERA_BreakTime        TAG_USER+2    // Break time
  1633. #define SERA_BitsPerChar    TAG_USER+3    // Bits per character
  1634. #define SERA_StopBits        TAG_USER+4    // Number of stop bits
  1635. #define SERA_BufferSize        TAG_USER+5    // Read/Write buffer size
  1636. #define SERA_Parity        TAG_USER+6    // Parity
  1637. #define SERA_Handshaking    TAG_USER+7    // Handshaking mode
  1638. #define SERA_HighSpeed        TAG_USER+8    // Highspeed mode
  1639. #define SERA_Shared        TAG_USER+9    // Shared access
  1640.  
  1641.  
  1642. /**********************************************************************/
  1643.  
  1644.  
  1645.     /* One of the emulation callback routines. */
  1646.  
  1647. typedef VOID (*  EPTR)(STRPTR Buffer);
  1648.  
  1649.     /* This structure describes an ANSI control sequence. */
  1650.  
  1651. struct ControlCode
  1652. {
  1653.     UBYTE    FirstChar;
  1654.     STRPTR    Match,
  1655.         Terminator;
  1656.     UBYTE    LastChar;
  1657.  
  1658.     BYTE    ExactSize;
  1659.     EPTR    Func;
  1660. };
  1661.  
  1662.  
  1663. /**********************************************************************/
  1664.  
  1665.  
  1666.     /* A 96 bit colour entry. */
  1667.  
  1668. typedef struct ColourEntry
  1669. {
  1670.     WORD            One,
  1671.                 Which;
  1672.  
  1673.     ULONG            Red,
  1674.                 Green,
  1675.                 Blue;
  1676. } ColourEntry;
  1677.  
  1678.     /* A table of colour entries, ready for LoadRGB32(). */
  1679.  
  1680. typedef struct ColourTable
  1681. {
  1682.     WORD            NumColours;
  1683.  
  1684.     struct ColourEntry    Entry[0];
  1685.  
  1686.     WORD            Terminator;
  1687. } ColourTable;
  1688.  
  1689.     /* Spread a byte across a long word. */
  1690.  
  1691. #define SPREAD(v)    ((ULONG)(v) << 24 | (ULONG)(v) << 16 | (ULONG)(v) << 8 | (v))
  1692.  
  1693.  
  1694. /**********************************************************************/
  1695.  
  1696.  
  1697.     /* AmigaUW terminal window resize support. */
  1698.  
  1699. #define UWCMD_TTYRESIZE (CMD_NONSTD)+20
  1700.  
  1701.  
  1702. /**********************************************************************/
  1703.  
  1704.  
  1705. typedef struct PhonebookHandle
  1706. {
  1707.     struct PhoneEntry    **Phonebook;
  1708.     LONG             PhoneSize;
  1709.     LONG             NumPhoneEntries;
  1710.     struct MinList        *PhoneGroupList;
  1711.     ULONG             PhonebookID;
  1712.     ULONG             DefaultGroup;
  1713.     UBYTE             PhonePassword[256];
  1714.     BOOLEAN             PhonePasswordUsed;
  1715.     BOOLEAN             AutoDial;
  1716.     BOOLEAN             AutoExit;
  1717. } PhonebookHandle;
  1718.  
  1719. typedef struct PhoneGroupNode
  1720. {
  1721.     struct Node         Node;
  1722.     UBYTE             LocalName[40];
  1723.     struct MinList         GroupList;
  1724. } PhoneGroupNode;
  1725.  
  1726. typedef struct PhonebookGlobals
  1727. {
  1728.     ULONG             Count;            // Number of entries in this phonebook
  1729.     ULONG             ID;            // ID counter for this phonebook
  1730.     ULONG             DefaultGroup;        // Number of the group the phonebook displays when first opened
  1731.     BOOLEAN             AutoDial;        // Start dialing after program is started
  1732.     BOOLEAN             AutoExit;        // Exit program after list is dialed
  1733. } PhonebookGlobals;
  1734.  
  1735. typedef struct PhoneGroupHeader
  1736. {
  1737.     UBYTE             FullName[40];        // Name of this very group
  1738.     LONG             Count;            // Number of entries to follow
  1739.     UBYTE             Pad[8];        // For future extension, if necessary
  1740. } PhoneGroupHeader;
  1741.  
  1742. /**********************************************************************/
  1743.  
  1744.  
  1745.     /* And now for something completely different... */
  1746.  
  1747. #include "termProtos.h"
  1748. #include "termData.h"
  1749. #include "termErrors.h"
  1750.